Skip to content

Conversation

@xterao
Copy link
Collaborator

@xterao xterao commented Jun 10, 2025

Implement a basic code inspection feature that checks the return type of DAO methods based on their annotation types.

Refactor the implementation of other code inspections and move the package of the class that returns the results of the code inspection feature.

@xterao xterao self-assigned this Jun 10, 2025
@xterao xterao added the enhancement New feature or request label Jun 10, 2025
@xterao xterao requested a review from Copilot June 10, 2025 04:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a basic code inspection feature that validates the return type of DAO methods and refactors the package structure of existing code inspection classes. Key changes include package renaming from common.sql.validator.result to common.validation.result, the addition of several new ValidationResult classes, and modifications in the PsiDaoMethod class.

Reviewed Changes

Copilot reviewed 71 out of 71 changed files in this pull request and generated no comments.

File Description
src/main/kotlin/org/domaframework/doma/intellij/contributor/sql/provider/SqlParameterCompletionProvider.kt Updated import for ValidationCompleteResult.
src/main/kotlin/org/domaframework/doma/intellij/common/validation/result/* Package name refactoring and new validation result implementations.
src/main/kotlin/org/domaframework/doma/intellij/common/util/ForDirectiveUtil.kt Updated imports to match the new package structure.
src/main/kotlin/org/domaframework/doma/intellij/common/psi/PsiDaoMethod.kt Updated sqlFileOption’s visibility from private to public.
Comments suppressed due to low confidence (1)

src/main/kotlin/org/domaframework/doma/intellij/common/psi/PsiDaoMethod.kt:64

  • Changing the visibility of sqlFileOption from private to public may expose internal state unintentionally. Consider using an accessor method if external access is needed or reverting to private to preserve encapsulation.
var sqlFileOption: Boolean = false

@xterao xterao linked an issue Jun 10, 2025 that may be closed by this pull request
@xterao xterao merged commit 74ac9f2 into main Jun 10, 2025
5 checks passed
@xterao xterao deleted the feature/check-dao-method-return-type branch June 10, 2025 05:21
@xterao xterao added this to the 1.1.0 Release milestone Jun 25, 2025
@xterao xterao linked an issue Jun 25, 2025 that may be closed by this pull request
@xterao xterao linked an issue Jun 25, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DAO Method Return Type Check

2 participants